<template>
  <div style="width: 83.33%;margin: 0px auto;">
    <div class="namelist">
      <router-link to="/knowledgeBase/pastTypical" style="color: #38C3C8;">
        <div>
          <img src="../../assets/images/fan hui.png" alt />&nbsp;&nbsp;返回
        </div>
      </router-link>
      <div class="namelist-collection" style="color: #38C3C8;">
        <img src="../../assets/images/shou cang.png" alt />&nbsp;&nbsp;收藏
      </div>
    </div>
    <div class="text-inner">
      <div>{{searchdetail.mainBody}}</div>
      <img :src="`http://123.56.85.94:2020/${searchdetail.picture_url}`" />
      <div>{{searchdetail.resume}}</div>
      <div>{{searchdetail.titleName}}</div>
    </div>
  </div>
</template>

<script>
  import { getAction } from '@/api/manage'
  export default {
  //这是主页
    name: 'MedicalGraphicsLibrary',
    data() {
      return {
        searchdetail: [],
        url: {
          getSearchPublicList: '/es/searchFull/getSearchPublicList'
        },
        isOpenAll: false,//记录是否所有的都处于打开/关闭状态
        openShowText: "全部展开",//记录按钮文字
        menuVisible: false,
        
      }
    },
  
    created() {
      this.everyId = this.$route.query.id
      getAction(this.url.getSearchPublicList, { searchName: this.everyId, searchType: 7 }).then(res => {
        if (res.success) {
          this.searchdetail = res.result[0];
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false
      })
    },
    methods: {
  	  openAll(){
  	    if(this.isOpenAll){
  	      this.activeNames = [];
  	      this.openShowText = "全部展开";
  	    }else{
  	      this.openShowText = "全部关闭";
  	      this.activeNames = ['1','2','3','4','5'];
  	    }
  	    this.isOpenAll = !this.isOpenAll;
  	  },
    }
  }
</script>

<style lang="less" scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/knowlagepublic.less';
</style>